// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 

package com.nnee.p_up;

import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.os.IBinder;

// Referenced classes of package com.nnee.p_up:
//            a

public class cls_CheckVersionService extends Service
{

    public CheckVersionService()
    {
    }

    public static void a(Context context, boolean flag)
    {
        Intent intent = new Intent();
        intent.setClass(context, com/netease/update/CheckVersionService);
        intent.putExtra("whether_should_show", flag);
        context.startService(intent);
    }

    private void a(Intent intent)
    {
        if(intent != null)
        {
            boolean flag = intent.getBooleanExtra("whether_should_show", false);
            if(b != null)
            {
                b.interrupt();
                b = null;
            }
            b = new Thread(new cls_a(this, flag));
            b.start();
        }
    }

    public IBinder onBind(Intent intent)
    {
        return null;
    }

    public void onCreate()
    {
        super.onCreate();
    }

    public void onDestroy()
    {
        super.onDestroy();
        if(b != null)
        {
            b.interrupt();
            b = null;
        }
    }

    public void onStart(Intent intent, int i)
    {
        a(intent);
    }

    public int onStartCommand(Intent intent, int i, int j)
    {
        a(intent);
        return 1;
    }

    public boolean onUnbind(Intent intent)
    {
        return super.onUnbind(intent);
    }

    private static final String a = "whether_should_show";
    private Thread b;
}
